import axios from 'axios'

let defaults_axios = axios.create({
    baseURL: 'https://d33a5037-6c63-4e92-8bb1-30018ab701ea.bspapp.com/http'
})

// 请求拦截
defaults_axios.interceptors.request.use((config) => {

    config.headers.userid = 1
    return config
}, (err) => {
    console.log(err)

    return Promise.reject(err)
})


//响应拦截
defaults_axios.interceptors.response.use((res) => {
    console.log(res)
    return res.data
}, (err) => {
    console.log(err)

    return Promise.reject(err)
});

export default defaults_axios